﻿-- =============================================
-- Author:		<Author,,Name>
-- Create date: <Create Date,,>
-- Description:	<Description,,>
-- =============================================
CREATE PROCEDURE [dbo].[VerifyUser] 
	@Email nvarchar(100),
	@Password nvarchar(300),
	@ResultType nvarchar(30) OUTPUT,
	@ResultMessage nvarchar(50) OUTPUT
AS
BEGIN TRANSACTION
IF  EXISTS(SELECT * FROM Mobile_User WHERE Email = @Email and Password = @Password)
BEGIN
	-- SET NOCOUNT ON added to prevent extra result sets from
	-- interfering with SELECT statements.
	SET NOCOUNT ON;
	SET @ResultType = '1'
    SET @ResultMessage = 'Valid User'
    SELECT @ResultType as N'@ResultType',@ResultMessage as N'@ResultMessage'
END
else
BEGIN
	SET @ResultType = '0'
    SET @ResultMessage = 'Invalid User'
    SELECT @ResultType as N'@ResultType',@ResultMessage as N'@ResultMessage'
END
COMMIT  
